import * as Enums from '../utils/Enums';

export default {
  /**
   * AK 与 SK 用于各服务的 API 鉴权；EOP AK 与 SK 用于各服务的 EOP 服务，
   * 见 utils/authHeader#buildEopHeaders
   */
  business: {
    [Enums.ServiceTypes.ProxyAppOrder]: {
      ak: process.env.PROXY_APP_ORDER_AK,
      sk: process.env.PROXY_APP_ORDER_SK,
      eop: {
        ak: process.env.PROXY_APP_ORDER_EOP_AK,
        sk: process.env.PROXY_APP_ORDER_EOP_SK,
      },
    },
    [Enums.ServiceTypes.ProxyAppRCrm]: {
      ak: process.env.PROXY_APP_R_CRM_AK,
      sk: process.env.PROXY_APP_R_CRM_SK,
      eop: {
        ak: process.env.PROXY_APP_R_CRM_EOP_AK,
        sk: process.env.PROXY_APP_R_CRM_EOP_SK,
      },
    },
    [Enums.ServiceTypes.Console]: {
      ak: process.env.CONSOLE_AK,
      sk: process.env.CONSOLE_SK,
      aimUrl: process.env.CONSOLE_AIM_URL,
      eop: {
        ak: process.env.CONSOLE_EOP_AK,
        sk: process.env.CONSOLE_EOP_SK,
      },
    },
    [Enums.ServiceTypes.CtConsole]: {
      eop: {
        ak: process.env.CT_CONSOLE_EOP_AK,
        sk: process.env.CT_CONSOLE_EOP_SK,
      },
    },
    [Enums.ServiceTypes.IT]: {
      eop: {
        ak: process.env.IT_EOP_AK,
        sk: process.env.IT_EOP_SK,
      },
    },
    [Enums.ServiceTypes.EShield]: {
      ak: process.env.ESHIELD_AK,
      sk: process.env.ESHIELD_SK,
      eop: {
        ak: process.env.ESHIELD_EOP_AK,
        sk: process.env.ESHIELD_EOP_SK,
      },
    },
    [Enums.ServiceTypes.EShieldBssCrm]: {
      eop: {
        ak: process.env.ESHIELD_BSSCRM_EOP_AK,
        sk: process.env.ESHIELD_BSSCRM_EOP_SK,
      },
    },
    [Enums.ServiceTypes.Firewall]: {
      eop: {
        ak: process.env.FIREWALL_EOP_AK,
        sk: process.env.FIREWALL_EOP_SK,
      },
    },
    [Enums.ServiceTypes.CloudAudit]: {
      ak: process.env.CLOUD_AUDIT_EOP_AK,
      sk: process.env.CLOUD_AUDIT_EOP_SK,
      eop: {
        ak: process.env.CLOUD_AUDIT_EOP_AK,
        sk: process.env.CLOUD_AUDIT_EOP_SK,
      },
    },
    [Enums.ServiceTypes.CloudAuditOss]: {
      eop: {
        ak: process.env.CLOUD_AUDIT_OSS_EOP_AK,
        sk: process.env.CLOUD_AUDIT_OSS_EOP_SK,
      },
    },
    [Enums.ServiceTypes.LogsAudit]: {
      ak: process.env.LOGS_AUDIT_EOP_AK,
      sk: process.env.LOGS_AUDIT_EOP_SK,
      eop: {
        ak: process.env.LOGS_AUDIT_OSS_EOP_AK,
        sk: process.env.LOGS_AUDIT_OSS_EOP_SK,
      },
    },
  },
  eop: {
    url: process.env.EOP_URL,
  },
  standalone: {
    businessServices: process.env.STANDALONE_BUSINESS_SERVICES,
    platformSso: process.env.STANDALONE_PLATFORM_SSO,
  },
  cas: {
    appId: process.env.CAS_APP_ID,
    appSecret: process.env.CAS_APP_SECRET,
    url: process.env.CAS_URL,
    serviceUrl: process.env.CAS_SERVICE_URL,
  },
};
